<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/13
 * Time: 17:59
 */


	namespace app\index\controller;
    class Captcha extends \think\Controller
    {

        public function index()
        {
            return $this->fetch();
        }

    // 验证码检测
        public function check($code='')
        {
            if (!captcha_check($code)) {
                $this->error('验证码错误');
            } else {
                $this->success('验证码正确');
            }
        }
    }